package com.chinairi.mall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chinairi.mall.model.News;
import com.chinairi.mall.dao.NewsMapper;
import com.chinairi.mall.model.ProjectPlanReq;
import com.chinairi.mall.service.INewsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Webgasd
 * @since 2020-10-19
 */
@Service
public class NewsServiceImpl extends ServiceImpl<NewsMapper, News> implements INewsService {
    @Autowired
    private NewsMapper newsMapper;

    /**
     * 获取新闻列表
     *
     * @return
     */
    @Override
    public List<News> getList() {
        QueryWrapper<News> wrapper = new QueryWrapper<>();
        wrapper.
                orderByDesc("NEWS_CREATE_TIME");
        return newsMapper.selectList(wrapper);
    }
}
